/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package prueba.view.html;

import java.util.AbstractList;
import java.util.ArrayList;
import java.util.List;
import prueba.view.resolver.CodeResolveView;
import prueba.view.resolver.code.ContextCodeResolveView;

/**
 *
 * @author HP_Propietario
 *
 * esto hay que acabarlo!!!
 *
 */
public abstract class AbstractHTMLPage {

    public List<Body> elementsBody;
    public List<Head> elementsHead;
      public ContextCodeResolveView codeResolveView;

    public AbstractHTMLPage() {
        codeResolveView = ContextCodeResolveView.getInstance();
    }



    /**
     *
     *
     * @return codeResolveView "iinyecta" en las subclases
     * el contextcodeResolveView
     *
     * 
     * */
    public ContextCodeResolveView getContextCodeResolveView(){
        return codeResolveView;
    }

    /***
     *
     *
     *
     *
     *@
     *
     */
    public void addElement(Body body) {
        if (elementsBody == null) {
            elementsBody = new ArrayList();
            elementsBody.add(body);
        }
        for (Body body1 : elementsBody) {
            body1.print().toString();
        }
        elementsBody.add(body);
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public void addElementHead(Head head) {
        if (elementsHead == null) {
            elementsHead = new ArrayList<Head>();
        }
        elementsHead.add(head);

    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public StringBuffer print() {
        //  body.process();
        return new StringBuffer();
    }

    /***
     *
     *
     *
     *
     *
     *
     */
    public List<Body> getElementsBody() {
        return elementsBody;
    }
}
